package com.gitee.ykr.lightweight.rpc.common.entity;

import com.gitee.ykr.lightweight.rpc.util.SnowflakeIdWorker;
import lombok.Data;

import java.io.Serializable;

/**
 * @author YKR
 * @Describe
 * @date 2021/8/8
 */
@Data
public class NettyRpcRequest extends NettyRpcMessage implements Serializable {

    //序列化id
    private static final long serialVersionUID = 6395330487058794296L;

    //服务的接口名
    String rpcClz;

    //请求参数类型
    private Class<?>[] paramTypes;

    //请求参数
    private Object[] params;

    //请求方url
    private String fromUrl;

    //同步标记
    private boolean isSyn;

    public NettyRpcRequest() {
        messageId = "" + SnowflakeIdWorker.getInstance().nextId();
    }
}
